feat(migration): add Assert.Warn support and Is.Positive/Negative tests#4363
Merged
feat(migration): add Assert.Warn support and Is.Positive/Negative tests#4363
Conversation
Converts NUnit's Assert.Warn() to Skip.Test() with "Warning: " prefix. NUnit's Assert.Warn outputs a warning but allows the test to continue. Since TUnit doesn't have a direct equivalent, this converts to a skip with a warning prefix so users can identify and handle these cases. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds test coverage for NUnit's Is.Positive and Is.Negative constraints, including their negated forms (Is.Not.Positive, Is.Not.Negative). These patterns were already implemented but lacked test coverage. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Owner
Author
|
Test review |
Owner
Author
|
PR Review for #4363 Summary: Adds Assert.Warn support for NUnit migration (converts to Skip.Test with warning prefix) and adds test coverage for Is.Positive/Negative patterns. Critical Issues: None found Suggestions: String interpolation creates unnecessary nested braces in CreateWarnAssertion. The method produces output with nested braces which works but is aesthetically suboptimal. However, this is functionally correct and follows existing patterns. Verdict: APPROVE - No critical issues found. Implementation follows existing patterns, includes comprehensive test coverage. |
This was referenced Jan 13, 2026
This was referenced Feb 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Assert.Warnhandling for NUnit migration - converts toSkip.Test($"Warning: {message}")since TUnit doesn't have a direct warning equivalentIs.Positive,Is.Negative,Is.Not.Positive, andIs.Not.Negativepatterns which were implemented but lacked testsTest plan
NUnit_Warn_Convertedtest validates Assert.Warn conversionNUnit_Is_Positive_Converted,NUnit_Is_Negative_Converted,NUnit_Is_Not_Positive_Converted,NUnit_Is_Not_Negative_Convertedtests validate positive/negative patterns🤖 Generated with Claude Code